package com.zzedu.dto;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 字段变更日志对象 zz_form_field_change_log
 *
 * @author Mr.Wang
 * @date 2025-05-31
 */
public class ZzFormFieldChangeLogDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */

    private Long id;
    /**
     * 批次号
     */
    private String batchNo;
    /**
     * 业务日期
     */
    private LocalDateTime busDate;
    /**
     * 变更对象ID
     */
    private Long relationId;
    /**
     * 变更对象类型
     */
    private String relationType;
    /**
     * 字段名称
     */
    private String field;
    /**
     * 字段code
     */
    private String fieldCode;
    /**
     * 新值
     */
    private String newValue;
    /**
     * 旧值
     */
    private String oldValue;
    /**
     * 添加时间
     */
    private LocalDateTime gmtCreate;
    /**
     * 更新时间
     */
    private LocalDateTime gmtModify;
    /**
     * 逻辑删除(0：未删除 1：id)
     */
    private Integer deleted;
    /**
     * 创建人
     */
    private Long createBy;
    /**
     * 修改人
     */
    private Long updateBy;

    /**
     * 操作账号
     */
    private String operAccNo;
    private Map<String, Object> params;
    /**
     * 当前记录起始索引
     */
    private Long pageNum = 1l;

    /**
     * 每页显示记录数
     */
    private Long pageSize = 20l;

    /**
     * 排序列
     */
    private String orderByColumn;
    /**
     * 操作人
     */
    private String operName;

    /**
     * 排序的方向desc或者asc
     */
    private String isAsc = "asc";

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setRelationId(Long relationId) {
        this.relationId = relationId;
    }

    public Long getRelationId() {
        return relationId;
    }

    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }

    public String getRelationType() {
        return relationType;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getField() {
        return field;
    }

    public void setFieldCode(String fieldCode) {
        this.fieldCode = fieldCode;
    }

    public String getFieldCode() {
        return fieldCode;
    }

    public void setNewValue(String newValue) {
        this.newValue = newValue;
    }

    public String getNewValue() {
        return newValue;
    }

    public void setOldValue(String oldValue) {
        this.oldValue = oldValue;
    }

    public String getOldValue() {
        return oldValue;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtModify(LocalDateTime gmtModify) {
        this.gmtModify = gmtModify;
    }

    public LocalDateTime getGmtModify() {
        return gmtModify;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }


    public Long getPageNum() {
        return pageNum;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc() {
        return isAsc;
    }

    public void setIsAsc(String isAsc) {
        this.isAsc = isAsc;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public IPage getPageDTO() {
        return PageDTO.of(getPageNum(), getPageSize());
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public LocalDateTime getBusDate() {
        return busDate;
    }

    public void setBusDate(LocalDateTime busDate) {
        this.busDate = busDate;
    }

    public String getOperName() {
        return operName;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    public String getOperAccNo() {
        return operAccNo;
    }

    public void setOperAccNo(String operAccNo) {
        this.operAccNo = operAccNo;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
